<template>
    <div>


        <!--面包屑导航区域-->
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/firsthop' }">首页</el-breadcrumb-item>
            <!--            <el-breadcrumb-item><a href="/">奖项查询</a></el-breadcrumb-item>-->
            <el-breadcrumb-item>查看学生成绩</el-breadcrumb-item>
        </el-breadcrumb>
        <!--搜索区域-->
        <h2>成绩列表</h2>
        <el-card>

<!--            <el-button type="primary" @click="addDialogVisible = true">添加成绩</el-button>-->
        </el-card>
        <el-tabs type="border-card">

            <el-tab-pane label="全部">
                <myStuGradeAll></myStuGradeAll>
            </el-tab-pane>
<!--            <el-tab-pane label="审核中">-->

<!--            </el-tab-pane>-->
        </el-tabs>


    </div>
</template>

<script>
    import myStuGradeAll from './myStuGradeAll.vue';
    export default {

        name: "myStuGrade",
        components:
            {myStuGradeAll},
        data(){
            return{
                drawlu:false,
                addDialogVisible: false,
                addForm:{},
                queryInfo: {
                    query: '',
                    //当前所在的页数
                    pageNum: 1,
                    //当前每页显示多少条数据
                    pageSize: 15
                },
                searchForm:{
                    studentName:'',
                    college:'',
                    courseName:'',
                },
                courseList:[],
                gradeList: [],
                searchFormForMysql:{
                    studentName:'',
                    college:'',
                    courseName:'',
                },
            }
        },
        created(){
            this.getCourseList()
            this.getAllGradeForTeacher()
        },
        methods:{

            async addGrade(){
                const {data: res} = await this.$http.post('addgrade', this.addForm)
                this.addDialogVisible = false
                this.$message.success('添加成绩成功');
                this.getGradeList()
            },
            async getCourseList() {
                console.log(this.GLOBAL.currentUser.teacherNumber);
                const {data: res} = await this.$http.post('getCourseForTeacher',this.$qs.stringify({
                    teacherNumber:this.GLOBAL.currentUser.teacherNumber
                }))
                this.courseList = res.data
            },

            addDialogClosed() {
                this.$refs.addFormRef.resetFields()
            },
        }
    }
</script>

<style scoped>

</style>